package com.sub.project.info.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sub.project.info.domain.UserEducational;
import com.sub.project.info.vo.EducationSchoolVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 【请填写功能名称】Mapper接口
 * 
 * @author ruoyi
 * @date 2020-01-07
 */
@Mapper

public interface UserEducationalMapper extends BaseMapper<UserEducational>
{
    @Select("select tue.id , tue.endtime , tue.starttime ,ts.id schoolid,ts.name schoolName, ts.type schoolType ,tue.major major , ts.properties schoolProperties from tb_user_educational tue left join tb_school ts on tue.schoolid = ts.id where tue.user_id = #{userId}")
    List<EducationSchoolVo> getEducationSchool(String userId);

    @Select("select tue.id , tue.endtime , tue.starttime ,ts.id schoolid,ts.name schoolName, ts.type schoolType,tue.major major , ts.properties schoolProperties from tb_user_educational tue left join tb_school ts on tue.schoolid = ts.id where tue.id = #{id}")
    EducationSchoolVo getEducationSchoolById(Long id);
}
